package MapDemo.demo2;

import java.util.ArrayList;
import java.util.Collections;

public class test1 {
    public static void main(String[] args){
        // 创建集合添加学生
        ArrayList<String> al = new ArrayList<>();
        al.add("张三");
        al.add("李四");
        al.add("王五");
        al.add("赵六");
        al.add("钱七");
        int i = 0;
        while (al.size() > 0){
            System.out.println(al);
            System.out.println(al.get(0));
            al.remove(0);
            Collections.shuffle(al);
        }

    }
}
